package com.hopes.common.receive;

import com.hopes.common.receive.aspect.RecordLogAspect;
import lombok.AllArgsConstructor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableAsync
@Configuration
@AllArgsConstructor
@ConditionalOnWebApplication
public class LogAutoConfiguration {


    public RecordLogAspect recordLogAspect(ApplicationEventPublisher publisher) {
        return new RecordLogAspect(publisher);
    }
}

